﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Village.Master" AutoEventWireup="true" CodeBehind="regfamily.aspx.cs" Inherits="Village_Project.regfamily" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <style type="text/css">

        .style2
        {
            width: 100%;
        }
        .style4
        {
        }
        .style9
        {
            width: 769px;
        }
        .style10
        {
            width: 80px;
        }
        .style11
        {
            height: 29px;
        }
        .style12
        {
            width: 112px;
        }
        </style>
        
<!-- 
	After you copied those 2 lines of code , make sure you take also the files into the same folder :-)
    Next step will be to set the appropriate statement to "start-up" the calendar on the needed HTML element.
    
    The first example of Javascript snippet is for the most basic use , as a popup calendar
    for a text field input.
-->


</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">



 <div id="page">
        <div id="content">
            <div class="post">
            <link rel="stylesheet" type="text/css" media="all" href="Style/jsDatePick_ltr.min.css" />
            <script type="text/javascript" src="JQuery/jsDatePick.min.1.3.js"></script>
            <!--Script-->
            <script type="text/javascript">
                window.onload = function () {
                    new JsDatePick({
                        useMode: 2,
                        target: "inputField",
                        dateFormat: "%d/%m/%Y",
                        cellColorScheme: "beige",
                        imgPath: "img/"
                    });
                };
            </script>

                <h3>
                    ลงทะเบียนครอบครัว </h3>

                       <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<asp:Panel ID="PatientInfoPanel" runat="server" BorderStyle="None" 
        GroupingText="ข้อมูลผู้รับบริการที่กำลังทำรายการ" Width="740px">
    <table class="style9">
                
                <tr>
                    <td class="style15">
                        &nbsp;</td>
                    <td class="style17">
                        &nbsp;</td>
                    <td class="style37">
                        &nbsp;</td>
                    <td class="style16">
                        &nbsp;</td>
                    <td class="style16">
                        &nbsp;</td>
                </tr>
                <tr>
                    <td class="style15">
                        ชื่อ&nbsp;
                        <asp:Label ID="FName" runat="server"></asp:Label>
                    </td>
                    <td class="style17">
                        นามสกุล</td>
                    <td class="style37">
                        <asp:Label ID="LName" runat="server"></asp:Label>
                    </td>
                    <td class="style16">
                        &nbsp;</td>
                    <td class="style16">
                        &nbsp;</td>
                </tr>
                <tr>
                    <td class="style25">
                        เลขประจำตัวประชาชน :</td>
                    <td class="style25" colspan="2">
                        <asp:Label ID="CIDLBL" runat="server" Text="xxxxxxxxxxxxx" ForeColor="Black"></asp:Label>
                        </td>
                    <td class="style25">
                        &nbsp;</td>
                    <td class="style25">
                        &nbsp;</td>
                </tr>
      
                <tr>
                    <td class="style1" colspan="5">
                        ผู้ดูแลหลัก :<asp:GridView ID="familylist1" runat="server" AllowPaging="True" 
                            AllowSorting="True" AutoGenerateColumns="False" CssClass="style6" PageSize="5">
                            <Columns>
                                <asp:HyperLinkField DataNavigateUrlFields="CID,fCID" 
                                    DataNavigateUrlFormatString="~/regfamily.aspx?CID={0}&amp;fCID={1}" 
                                    DataTextField="fCID" HeaderText="เลขประชาชน" />
                                <asp:HyperLinkField DataNavigateUrlFields="CID,fCID" 
                                    DataNavigateUrlFormatString="~/regfamily.aspx?CID={0}&amp;fCID={1}" 
                                    DataTextField="Name" HeaderText="ชื่อ" />
                                <asp:HyperLinkField DataNavigateUrlFields="CID,fCID" 
                                    DataNavigateUrlFormatString="~/regfamily.aspx?CID={0}&amp;fCID={1}" 
                                    DataTextField="LastName" HeaderText="นามสกุล" />
                                <asp:HyperLinkField DataNavigateUrlFields="CID,fCID" 
                                    DataNavigateUrlFormatString="~/regfamily.aspx?CID={0}&amp;fCID={1}" 
                                    DataTextField="MariageStatus" HeaderText="ความสัมพันธ์" />
                            </Columns>
                            <AlternatingRowStyle BackColor="White" />
                            <EditRowStyle BackColor="#2461BF" />
                            <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                            <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                            <PagerSettings FirstPageText="First" LastPageText="Last" 
                                Mode="NumericFirstLast" PageButtonCount="2" />
                            <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
                            <RowStyle BackColor="#EFF3FB" />
                            <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
                            <SortedAscendingCellStyle BackColor="#F5F7FB" />
                            <SortedAscendingHeaderStyle BackColor="#6D95E1" />
                            <SortedDescendingCellStyle BackColor="#E9EBEF" />
                            <SortedDescendingHeaderStyle BackColor="#4870BE" />
                        </asp:GridView>
                        <asp:Button runat="server" Text="ลบผุ้ดูแลหลัก" ID="dele_carer" 
                            onclick="dele_carer_Click" Visible="False" />
                    </td>
                </tr>
                
                </table>    
    </asp:Panel> 

<asp:Panel ID="FamilyInfoPanel" runat="server" BorderStyle="None" 
        GroupingText="ข้อมูลญาติผู้รับบริการ" Width="740px">
    <asp:GridView ID="familylist" runat="server" 
        AutoGenerateColumns="False" AllowPaging="True" AllowSorting="True" 
        PageSize="5" CssClass="style6" onpageindexchanging="familylist_SelectedIndexChanged" 
        >
            <Columns>
                <asp:TemplateField HeaderText="ลำดับที่">
                    <ItemTemplate>
                        <%# Container.DataItemIndex + 1 %>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:HyperLinkField   
                    HeaderText="เลขประชาชน"  
                    DataNavigateUrlFields="CID,fCID"  
                    DataNavigateUrlFormatString="~/regfamily.aspx?CID={0}&fCID={1}"  
                    DataTextField="fCID"  
                    />
                <asp:HyperLinkField   
                    HeaderText="ชื่อ"  
                    DataNavigateUrlFields="CID,fCID"  
                    DataNavigateUrlFormatString="~/regfamily.aspx?CID={0}&fCID={1}"  
                    DataTextField="Name"  
                    />
                <asp:HyperLinkField   
                    HeaderText="นามสกุล"  
                    DataNavigateUrlFields="CID,fCID"  
                    DataNavigateUrlFormatString="~/regfamily.aspx?CID={0}&fCID={1}"  
                    DataTextField="LastName"  
                    />
                <asp:HyperLinkField   
                    HeaderText="ความสัมพันธ์"  
                    DataNavigateUrlFields="CID,fCID"  
                    DataNavigateUrlFormatString="~/regfamily.aspx?CID={0}&fCID={1}"  
                    DataTextField="MariageStatus"  
                    />


                     <asp:HyperLinkField   
                    HeaderText="เลือกเป็นผู้ดูแลหลัก"  
                    DataNavigateUrlFields="CID,fCID"  
                    DataNavigateUrlFormatString="~/CarerSelect.aspx?CID={0}&fCID={1}"  
                    Text="เลือกเป็นผู้ดูแลหลัก"
                    />

                    
            </Columns>
            <AlternatingRowStyle BackColor="White" />
            <EditRowStyle BackColor="#2461BF" />
            <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
            <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
            <PagerSettings FirstPageText="First" LastPageText="Last" 
            Mode="NumericFirstLast" PageButtonCount="2" />
            <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
            <RowStyle BackColor="#EFF3FB" />
            <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
            <SortedAscendingCellStyle BackColor="#F5F7FB" />
            <SortedAscendingHeaderStyle BackColor="#6D95E1" />
            <SortedDescendingCellStyle BackColor="#E9EBEF" />
            <SortedDescendingHeaderStyle BackColor="#4870BE" />
        </asp:GridView>   
        &nbsp;<asp:GridView ID="familylist0" runat="server" AllowPaging="True" 
        AllowSorting="True" AutoGenerateColumns="False" CssClass="style6" 
        PageSize="5" onpageindexchanging="familylist_SelectedIndexChanged2">
        <Columns>
            <asp:TemplateField HeaderText="ลำดับที่">
                <ItemTemplate>
                    <%# Container.DataItemIndex + 1 %>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:HyperLinkField DataNavigateUrlFields="CID,fCID" 
                DataNavigateUrlFormatString="~/regfamily.aspx?CID={0}&amp;fCID={1}" 
                DataTextField="fCID" HeaderText="เลขประชาชน" />
            <asp:HyperLinkField DataNavigateUrlFields="CID,fCID" 
                DataNavigateUrlFormatString="~/regfamily.aspx?CID={0}&amp;fCID={1}" 
                DataTextField="Name" HeaderText="ชื่อ" />
            <asp:HyperLinkField DataNavigateUrlFields="CID,fCID" 
                DataNavigateUrlFormatString="~/regfamily.aspx?CID={0}&amp;fCID={1}" 
                DataTextField="LastName" HeaderText="นามสกุล" />
            <asp:HyperLinkField DataNavigateUrlFields="CID,fCID" 
                DataNavigateUrlFormatString="~/regfamily.aspx?CID={0}&amp;fCID={1}" 
                DataTextField="MariageStatus" HeaderText="ความสัมพันธ์" />
           
        </Columns>
        <AlternatingRowStyle BackColor="White" />
        <EditRowStyle BackColor="#2461BF" />
        <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
        <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
        <PagerSettings FirstPageText="First" LastPageText="Last" 
            Mode="NumericFirstLast" PageButtonCount="2" />
        <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
        <RowStyle BackColor="#EFF3FB" />
        <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
        <SortedAscendingCellStyle BackColor="#F5F7FB" />
        <SortedAscendingHeaderStyle BackColor="#6D95E1" />
        <SortedDescendingCellStyle BackColor="#E9EBEF" />
        <SortedDescendingHeaderStyle BackColor="#4870BE" />
    </asp:GridView>
    </asp:Panel> 
        <asp:Button ID="WelfareEdit_Button" runat="server" onclick="WelfareEdit_Button_Click" 
                Text="เพิ่มบุคคลในครอบครัว" style="text-align: center; margin-left: 300px" 
        Visible="True" />

<asp:Panel ID="WelfareRegPanel" runat="server" BorderStyle="None" 
        GroupingText="ข้อมูลญาติผู้รับบริการโดยละเอียด" Width="740px" 
        Visible="False">
    <table class="style50">
                
                <tr>
                    <td class="style15">
                        &nbsp;</td>
                    <td class="style10">
                        &nbsp;</td>
                    <td class="style4">
                        &nbsp;</td>
                    <td class="style5">
                        &nbsp;</td>
                    <td class="style3">
                        &nbsp;</td>
                </tr>
                <tr>
                    <td class="style15">
                        ชื่อ&nbsp;
                        <asp:Label ID="RFName" runat="server"></asp:Label>
                    </td>
                    <td class="style10">
                        นามสกุล</td>
                    <td class="style4">
                        <asp:Label ID="RLName" runat="server"></asp:Label>
                    </td>
                    <td class="style5">
                        &nbsp;</td>
                    <td class="style3">
                        &nbsp;</td>
                </tr>
                <tr>
                    <td class="style25">
                        เลขประจำตัวประชาชน :</td>
                    <td class="style25" colspan="2">
                        <asp:Label ID="RCIDLBL" runat="server" Text="xxxxxxxxxxxxx" ForeColor="Black"></asp:Label>
                        </td>
                    <td class="style5">
                        &nbsp;</td>
                    <td class="style3">
                        &nbsp;</td>
                </tr>
                 <tr>
                    <td class="style15">
                        สัญชาติ&nbsp;:
                        <asp:Label ID="NationLB" runat="server"></asp:Label>
                    </td>
                    <td class="style10">
                        เชื้อชาติ :</td>
                    <td class="style4">
                        <asp:Label ID="RaceLB" runat="server"></asp:Label>
                    </td>
                    <td class="style5">
                        ศาสนา :</td>
                    <td class="style3">
                        <asp:Label ID="ReligionLB" runat="server"></asp:Label>
                     </td>
                </tr>
      
                
                <tr>
                    <td class="style15">
                        &nbsp;</td>
                    <td class="style10">
                        &nbsp;</td>
                    <td class="style4">
                        &nbsp;</td>
                    <td class="style5">
                        &nbsp;</td>
                    <td class="style3">
                        &nbsp;</td>
                </tr>
                <tr>
                    <td class="style15">
                        &nbsp;</td>
                    <td class="style10">
                        &nbsp;</td>
                    <td class="style4">
                        &nbsp;</td>
                    <td class="style5">
                        &nbsp;</td>
                    <td class="style3">
                        &nbsp;</td>
                </tr>     
                </table>
                <asp:Panel ID="CensusRegPanel" runat="server" BorderStyle="None" 
        GroupingText="ข้อมูลที่อยู่อาศัยในทะเบียนบ้าน" Width="700px" 
        Visible="False">
        <table class="style50">
          
            <tr>
                <td class="style15">
                    &nbsp;</td>
                <td class="style17">
                    &nbsp;</td>
                <td class="style37">
                    &nbsp;</td>
                <td class="style16">
                    &nbsp;</td>
                <td class="style16">
                    &nbsp;</td>
            </tr>
            <tr>
                <td class="style15">
                    บ้านเลขที่</td>
                <td class="style17">
                    &nbsp;&nbsp;
                    <asp:Label ID="CHomeLB" runat="server"></asp:Label>
                </td>
                <td class="style37">
                    &nbsp;</td>
                <td class="style16">
                    หมู่</td>
                <td class="style16">
                    <asp:Label ID="CGroupLB" runat="server"></asp:Label>
                </td>
            </tr>
            <tr>
                <td class="style15">
                    ชื่อหมูบ้าน</td>
                <td class="style17">
                    <asp:Label ID="CVillageLB" runat="server"></asp:Label>
                </td>
                <td class="style37">
                    &nbsp;</td>
                <td class="style16">
                    ซอย</td>
                <td class="style16">
                    <asp:Label ID="CSoyLB" runat="server"></asp:Label>
                </td>
            </tr>
            <tr>
                <td class="style25">
                    ถนน</td>
                <td class="style25" colspan="2">
                    &nbsp;&nbsp;
                    <asp:Label ID="CStreetLB" runat="server"></asp:Label>
                </td>
                <td class="style25">
                    ตำบล</td>
                <td class="style25">
                    <asp:Label ID="CTambonLB" runat="server"></asp:Label>
                </td>
            </tr>
            <tr>
                <td class="style25">
                    อำเภอ</td>
                <td class="style25" colspan="2">
                    &nbsp;&nbsp;
                    <asp:Label ID="CCityLB" runat="server"></asp:Label>
                </td>
                <td class="style25">
                    จังหวัด</td>
                <td class="style25">
                    <asp:Label ID="CProvinceLB" runat="server"></asp:Label>
                </td>
            </tr>
            <tr>
                <td class="style25">
                    รหัสไปรษณีย์</td>
                <td class="style25" colspan="2">
                    &nbsp;&nbsp;
                    <asp:Label ID="CPostcodeLB" runat="server"></asp:Label>
                </td>
                <td class="style25">
                    &nbsp;</td>
                <td class="style25">
                    &nbsp;</td>
            </tr>
            <tr>
                <td class="style25">
                    วันที่ย้ายเข้า</td>
                <td class="style25" colspan="2">
                    &nbsp;&nbsp;
                    <asp:Label ID="CMIDLB" runat="server"></asp:Label>
                </td>
                <td class="style25">
                    วันที่ย้ายออก</td>
                <td class="style25">
                    <asp:Label ID="CMOBLB" runat="server"></asp:Label>
                </td>
            </tr>
            <tr>
                <td class="style25">
                    &nbsp; &nbsp;</td>
                <td class="style25" colspan="2">
                    &nbsp;&nbsp;&nbsp;</td>
                <td class="style25">
                    &nbsp;</td>
                <td class="style25">
                    &nbsp;</td>
            </tr>
            <tr>
                <td class="style25">
                    &nbsp;</td>
                <td class="style25" colspan="2">
                    &nbsp;</td>
                <td class="style25">
                    &nbsp;</td>
                <td class="style25">
                    &nbsp;</td>
            </tr>
        </table>
        </asp:Panel>  
        <asp:Panel ID="LiveRegPanel" runat="server" BorderStyle="None" 
        GroupingText="ข้อมูลที่อยู่อาศัยปัจจุบัน" Width="700px" Visible="False">
        <table class="style50">
          
            <tr>
                <td class="style15">
                    &nbsp;</td>
                <td class="style17">
                    &nbsp;</td>
                <td class="style37">
                    &nbsp;</td>
                <td class="style16">
                    &nbsp;</td>
                <td class="style16">
                    &nbsp;</td>
            </tr>
            <tr>
                <td class="style15">
                    บ้านเลขที่</td>
                <td class="style17">
                    &nbsp;&nbsp;
                    <asp:Label ID="LHomeLB" runat="server"></asp:Label>
                </td>
                <td class="style37">
                    &nbsp;</td>
                <td class="style16">
                    หมู่</td>
                <td class="style16">
                    <asp:Label ID="LGroupLB" runat="server"></asp:Label>
                </td>
            </tr>
            <tr>
                <td class="style15">
                    ชื่อหมูบ้าน</td>
                <td class="style17">
                    <asp:Label ID="LVillageLB" runat="server"></asp:Label>
                </td>
                <td class="style37">
                    &nbsp;</td>
                <td class="style16">
                    ซอย</td>
                <td class="style16">
                    <asp:Label ID="LSoyLB" runat="server"></asp:Label>
                </td>
            </tr>
            <tr>
                <td class="style25">
                    ถนน</td>
                <td class="style25" colspan="2">
                    &nbsp;&nbsp;
                    <asp:Label ID="LStreetLB" runat="server"></asp:Label>
                </td>
                <td class="style25">
                    ตำบล</td>
                <td class="style25">
                    <asp:Label ID="LTambonLB" runat="server"></asp:Label>
                </td>
            </tr>
            <tr>
                <td class="style25">
                    อำเภอ</td>
                <td class="style25" colspan="2">
                    &nbsp;&nbsp;
                    <asp:Label ID="LCityLB" runat="server"></asp:Label>
                </td>
                <td class="style25">
                    จังหวัด</td>
                <td class="style25">
                    <asp:Label ID="LProvinceLB" runat="server"></asp:Label>
                </td>
            </tr>
            <tr>
                <td class="style25">
                    รหัสไปรษณีย์</td>
                <td class="style25" colspan="2">
                    &nbsp;&nbsp;
                    <asp:Label ID="LPostcodeLB" runat="server"></asp:Label>
                </td>
                <td class="style25">
                    &nbsp;</td>
                <td class="style25">
                    &nbsp;</td>
            </tr>
            <tr>
                <td class="style25">
                    วันที่ย้ายเข้า</td>
                <td class="style25" colspan="2">
                    &nbsp;&nbsp;
                    <asp:Label ID="LMIDLB" runat="server"></asp:Label>
                </td>
                <td class="style25">
                    วันที่ย้ายออก</td>
                <td class="style25">
                    <asp:Label ID="LMODLB" runat="server"></asp:Label>
                </td>
            </tr>
            <tr>
                <td class="style25">
                    &nbsp;</td>
                <td class="style25" colspan="2">
                    &nbsp;&nbsp;&nbsp;
                    </td>
                <td class="style25">
                    &nbsp;</td>
                <td class="style25">
                    &nbsp;</td>
            </tr>
            <tr>
                <td class="style25">
                    &nbsp;</td>
                <td class="style25" colspan="2">
                    &nbsp;</td>
                <td class="style25">
                    &nbsp;</td>
                <td class="style25">
                    &nbsp;</td>
            </tr>
        </table>
        </asp:Panel>  

    <br />
    <asp:Panel ID="Panel5" runat="server" GroupingText="ข้อมูลการศึกษาและทำงาน">
        ระดับการศึกษา
        <asp:Label ID="EducationLevelLB" runat="server" Text="Label"></asp:Label>
        <br />
        <br />
        อาชีพ&nbsp;
        <asp:Label ID="OccupationLB" runat="server" Text="Label"></asp:Label>
        <br />
        <br />
        สถานที่ทำงาน
        <asp:Label ID="AddressOccupationLB" runat="server" Text="Label"></asp:Label>
        <br />
        <br />
        รายได้ต่อเดือน
        <asp:Label ID="IncomePerMonthLB" runat="server" Text="Label"></asp:Label>
        <br />
        <br />
        รายได้จากที่อื่น
        <asp:Label ID="OtherIncomeLB" runat="server" Text="Label"></asp:Label>
        <br />
        <br />
        ที่มาของรายได้
        <asp:Label ID="OtherIncomeFromLB" runat="server" Text="Label"></asp:Label>
        <br />
        <br />
        <asp:Button ID="RegWF_Button" runat="server" Height="26px" 
            onclick="RegWF_Button_Click" style="text-align: center; margin-left: 5px" 
            Text="แก้ไข" />
        <br />
    </asp:Panel>

    </asp:Panel> 



    <asp:Panel ID="Panel1" runat="server" BorderStyle="None" 
        GroupingText="ข้อมูลญาติผู้รับบริการโดยละเอียด" Width="740px" 
        Visible="False">
    <table class="style50">
                
                <tr>
                    <td class="style15">
                        &nbsp;</td>
                    <td class="style17">
                        &nbsp;</td>
                    <td class="style4">
                        &nbsp;</td>
                    <td class="style12">
                        &nbsp;</td>
                    <td class="style3">
                        &nbsp;</td>
                </tr>
                <tr>
                    <td class="style15">
                        ชื่อ&nbsp;
                        <asp:DropDownList ID="TitlesD" runat="server" Width="100px">
                        </asp:DropDownList>
                    </td>
                    <td class="style17">
                        <asp:TextBox ID="FirstName" runat="server"></asp:TextBox>
                    </td>
                    <td class="style4">
                        นามสกุล</td>
                    <td class="style12">
                        <asp:TextBox ID="LastName" runat="server"></asp:TextBox>
                    </td>
                    <td class="style3">
                        &nbsp;</td>
                </tr>
                <tr>
                    <td class="style15">
                        <asp:DropDownList ID="MariageStatus" runat="server">
                        </asp:DropDownList>
                    </td>
                    <td class="style17">
                        สถานะการมีชีวิต</td>
                    <td class="style4" colspan="3">
                        <asp:RadioButtonList ID="LiveStatusRBL" runat="server">
                        </asp:RadioButtonList>
                    </td>
                </tr>
                <tr>
                    <td class="style25">
                        เลขประจำตัวประชาชน :</td>
                    <td class="style25" colspan="2">
                        <asp:TextBox ID="CIDTB" runat="server" ForeColor="Black"></asp:TextBox>
                        </td>
                    <td class="style12">
                        &nbsp;</td>
                    <td class="style3">
                        &nbsp;</td>
                </tr>
                 <tr>
                    <td class="style15">
                        สัญชาติ&nbsp;:
                        <asp:TextBox ID="NationTB" runat="server"></asp:TextBox>
                    </td>
                    <td class="style17">
                        เชื้อชาติ :</td>
                    <td class="style4">
                        <asp:TextBox ID="RaceTB" runat="server"></asp:TextBox>
                    </td>
                    <td class="style12">
                        &nbsp;</td>
                    <td class="style3">
                        &nbsp;</td>
                </tr>
      
                
                <tr>
                    <td class="style15">
                        &nbsp;
                    </td>
                    <td class="style17">
                        ศาสนา :</td>
                    <td class="style4">
                        <asp:TextBox ID="ReligionTB" runat="server"></asp:TextBox>
                    </td>
                    <td class="style12">
                        &nbsp;</td>
                    <td class="style3">
                        &nbsp;</td>
                </tr>
                <tr>
                    <td class="style15">
                        สถานะสมรส :</td>
                    <td class="style17">
                        <asp:RadioButtonList ID="MariageStatusRBL" runat="server">
                        </asp:RadioButtonList>
                    </td>
                    <td class="style4" colspan="2">
                        &nbsp;</td>
                    <td class="style3">
                        &nbsp;</td>
                </tr>
                <tr>
                    <td class="style15">
                        &nbsp;</td>
                    <td class="style17">
                        &nbsp;</td>
                    <td class="style4">
                        &nbsp;</td>
                    <td class="style12">
                        &nbsp;</td>
                    <td class="style3">
                        &nbsp;</td>
                </tr>     
                </table>
                <asp:Panel ID="Panel2" runat="server" BorderStyle="None" 
        GroupingText="ข้อมูลที่อยู่อาศัยในทะเบียนบ้าน" Width="700px" Visible="False">
        <table class="style50">
          
            <tr>
                <td class="style15">
                    &nbsp;</td>
                <td class="style17">
                    &nbsp;</td>
                <td class="style37">
                    &nbsp;</td>
                <td class="style16">
                    &nbsp;</td>
                <td class="style16">
                    &nbsp;</td>
            </tr>
            <tr>
                <td class="style15">
                    บ้านเลขที่</td>
                <td class="style17">
                    &nbsp;&nbsp;
                    <asp:TextBox ID="CHomeTB" runat="server"></asp:TextBox>
                </td>
                <td class="style37">
                    &nbsp;</td>
                <td class="style16">
                    หมู่</td>
                <td class="style16">
                    <asp:TextBox ID="CGroupTB" runat="server"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td class="style15">
                    ชื่อหมู่บ้าน</td>
                <td class="style17">
                    <asp:TextBox ID="CHomeNTB" runat="server"></asp:TextBox>
                </td>
                <td class="style37">
                    &nbsp;</td>
                <td class="style16">
                    ซอย</td>
                <td class="style16">
                    <asp:TextBox ID="CSoyTB" runat="server"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td class="style25">
                    ถนน</td>
                <td class="style25" colspan="2">
                    &nbsp;&nbsp;
                    <asp:TextBox ID="CStreetTB" runat="server"></asp:TextBox>
                </td>
                <td class="style25">
                    ตำบล</td>
                <td class="style25">
                    <asp:DropDownList ID="CTambonD" runat="server">
                        <asp:ListItem Value="0">เลือกอำเภอก่อน</asp:ListItem>
                    </asp:DropDownList>
                </td>
            </tr>
            <tr>
                <td class="style25">
                    อำเภอ</td>
                <td class="style25" colspan="2">
                    &nbsp;&nbsp;
                    <asp:DropDownList ID="CCityD" runat="server" AutoPostBack="True" 
                        onselectedindexchanged="CCityD_SelectedIndexChanged">
                        <asp:ListItem Value="0">เลือกจังหวัดก่อน</asp:ListItem>
                    </asp:DropDownList>
                </td>
                <td class="style25">
                    จังหวัด</td>
                <td class="style25">
                    <asp:DropDownList ID="CProvinceD" runat="server" AutoPostBack="True" 
                        onselectedindexchanged="CProvinceD_SelectedIndexChanged">
                    </asp:DropDownList>
                </td>
            </tr>
            <tr>
                <td class="style25">
                    รหัสไปรษณีย์</td>
                <td class="style25" colspan="2">
                    &nbsp;&nbsp;
                    <asp:TextBox ID="CPostcodeTB" runat="server" MaxLength="5"></asp:TextBox>
                </td>
                <td class="style25">
                    &nbsp;</td>
                <td class="style25">
                    &nbsp;</td>
            </tr>
            <tr>
                <td class="style25">
                    &nbsp;</td>
                <td class="style25" colspan="2">
                    &nbsp;</td>
                <td class="style25">
                    &nbsp;</td>
                <td class="style25">
                    &nbsp;</td>
            </tr>
            <tr>
                <td class="style25">
                    วันที่ย้ายเข้า</td>
                <td class="style25" colspan="2">
                    &nbsp;&nbsp;
                    <em>
                    <asp:TextBox ID="CMIDTB" runat="server">1/1/1800</asp:TextBox>
                    </em>
                    <asp:ImageButton ID="CMIDIB" runat="server" ImageUrl="~/img/cal.png" 
                        onclick="CMIDIB_Click" />
                    <asp:Calendar ID="CMIDCal" runat="server" BackColor="Silver" 
                        BorderStyle="Dashed" onselectionchanged="CMIDCal_SelectionChanged" 
                        ShowGridLines="True" Visible="False">
                        <DayHeaderStyle BackColor="#999999" />
                        <DayStyle BackColor="#0066CC" />
                        <NextPrevStyle BackColor="Silver" />
                        <SelectedDayStyle BackColor="#CC6600" />
                        <TodayDayStyle BackColor="#CC6600" />
                    </asp:Calendar>
                </td>
                <td class="style25">
                    วันที่ย้ายออก</td>
                <td class="style25">
                    <asp:TextBox ID="CMODTB" runat="server">1/1/1800</asp:TextBox>
                    <asp:ImageButton ID="CMODIB" runat="server" ImageUrl="~/img/cal.png" 
                        onclick="CMODIB_Click" />
                    <asp:Calendar ID="CMODCal" runat="server" BackColor="Silver" 
                        BorderStyle="Dashed" onselectionchanged="CMODCal_SelectionChanged" 
                        ShowGridLines="True" Visible="False">
                        <DayHeaderStyle BackColor="#999999" />
                        <DayStyle BackColor="#0066CC" />
                        <NextPrevStyle BackColor="Silver" />
                        <SelectedDayStyle BackColor="#CC6600" />
                        <TodayDayStyle BackColor="#CC6600" />
                    </asp:Calendar>
                </td>
            </tr>
            <tr>
                <td class="style25">
                    สาเหตุการย้ายออก</td>
                <td class="style25" colspan="2">
                    &nbsp;&nbsp;&nbsp;<asp:RadioButtonList ID="CensusMoveOutReason" runat="server">
                        <asp:ListItem Value="1">ตาย</asp:ListItem>
                        <asp:ListItem Value="2">ย้าย</asp:ListItem>
                        <asp:ListItem Value="3">สาบสูญ</asp:ListItem>
                        <asp:ListItem Value="0">ไม่มี</asp:ListItem>
                    </asp:RadioButtonList>
                </td>
                <td class="style25">
                    &nbsp;</td>
                <td class="style25">
                    &nbsp;</td>
            </tr>
            <tr>
                <td class="style25">
                    &nbsp;</td>
                <td class="style25" colspan="2">
                    &nbsp;</td>
                <td class="style25">
                    &nbsp;</td>
                <td class="style25">
                    &nbsp;</td>
            </tr>
        </table>
        </asp:Panel>  
        <asp:Panel ID="Panel3" runat="server" BorderStyle="None" 
        GroupingText="ข้อมูลที่อยู่อาศัยปัจจุบัน" Width="700px" Visible="False">
        <table class="style50">
          
            <tr>
                <td class="style15">
                    &nbsp;</td>
                <td class="style17">
                    &nbsp;</td>
                <td class="style37">
                    &nbsp;</td>
                <td class="style16">
                    &nbsp;</td>
                <td class="style16">
                    &nbsp;</td>
            </tr>
            <tr>
                <td class="style15">
                    บ้านเลขที่</td>
                <td class="style17">
                    &nbsp;&nbsp;
                    <asp:TextBox ID="LHomeTB" runat="server"></asp:TextBox>
                </td>
                <td class="style37">
                    &nbsp;</td>
                <td class="style16">
                    หมู่</td>
                <td class="style16">
                    <asp:TextBox ID="LGroupTB" runat="server"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td class="style15">
                    ชื่อหมู่บ้าน</td>
                <td class="style17">
                    &nbsp;<asp:TextBox ID="LHomeNTB" runat="server"></asp:TextBox>
                    &nbsp;</td>
                <td class="style37">
                    &nbsp;</td>
                <td class="style16">
                    ซอย</td>
                <td class="style16">
                    <asp:TextBox ID="LSoyTB" runat="server"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td class="style25">
                    ถนน</td>
                <td class="style25" colspan="2">
                    &nbsp;&nbsp;
                    <asp:TextBox ID="LStreetTB" runat="server"></asp:TextBox>
                </td>
                <td class="style25">
                    ตำบล</td>
                <td class="style25">
                    <asp:DropDownList ID="LTambonD" runat="server">
                        <asp:ListItem Value="0">เลือกอำเภอก่อน</asp:ListItem>
                    </asp:DropDownList>
                </td>
            </tr>
            <tr>
                <td class="style25">
                    อำเภอ</td>
                <td class="style25" colspan="2">
                    &nbsp;&nbsp;
                    <asp:DropDownList ID="LCityD" runat="server" AutoPostBack="True" 
                        onselectedindexchanged="LCityD_SelectedIndexChanged">
                        <asp:ListItem Value="0">เลือกจังหวัดก่อน</asp:ListItem>
                    </asp:DropDownList>
                </td>
                <td class="style25">
                    จังหวัด</td>
                <td class="style25">
                    <asp:DropDownList ID="LProvinceD" runat="server" AutoPostBack="True" 
                        onselectedindexchanged="LProvinceD_SelectedIndexChanged">
                    </asp:DropDownList>
                </td>
            </tr>
            <tr>
                <td class="style11">
                    รหัสไปรษณีย์</td>
                <td class="style11" colspan="2">
                    &nbsp;&nbsp;
                    <asp:TextBox ID="LPostcodeTB" runat="server" MaxLength="5"></asp:TextBox>
                </td>
                <td class="style11">
                    </td>
                <td class="style11">
                    </td>
            </tr>
            <tr>
                <td class="style25">
                    &nbsp;</td>
                <td class="style25" colspan="2">
                    &nbsp;</td>
                <td class="style25">
                    &nbsp;</td>
                <td class="style25">
                    &nbsp;</td>
            </tr>
            <tr>
                <td class="style25">
                    วันที่ย้ายเข้า</td>
                <td class="style25" colspan="2">
                    &nbsp;&nbsp;
                    <asp:TextBox ID="LMIDTB" runat="server">1/1/1800</asp:TextBox>
                    <asp:ImageButton ID="LMIDIB" runat="server" ImageUrl="~/img/cal.png" 
                        onclick="LMIDIB_Click" />
                    <asp:Calendar ID="LMIDCal" runat="server" NextPrevFormat="ShortMonth" 
                        onselectionchanged="LMIDCal_SelectionChanged" ShowGridLines="True" 
                        Visible="False">
                        <DayHeaderStyle BackColor="#999999" />
                        <DayStyle BackColor="#0066CC" />
                        <NextPrevStyle BackColor="Silver" />
                        <SelectedDayStyle BackColor="#CC6600" />
                        <TodayDayStyle BackColor="#CC6600" />
                    </asp:Calendar>
                </td>
                <td class="style25">
                    วันที่ย้ายออก</td>
                <td class="style25">
                    <asp:TextBox ID="LMODTB" runat="server">1/1/1800</asp:TextBox>
                    <asp:ImageButton ID="LMODIB" runat="server" ImageUrl="~/img/cal.png" 
                        onclick="LMODIB_Click" />
                    <asp:Calendar ID="LMODCal" runat="server" 
                        onselectionchanged="LMODCal_SelectionChanged" ShowGridLines="True" 
                        Visible="False">
                        <DayHeaderStyle BackColor="#999999" />
                        <DayStyle BackColor="#0066CC" />
                        <NextPrevStyle BackColor="Silver" />
                        <SelectedDayStyle BackColor="#CC6600" />
                        <TodayDayStyle BackColor="#CC6600" />
                    </asp:Calendar>
                </td>
            </tr>
            <tr>
                <td class="style25">
                    สาเหตุการย้ายออก</td>
                <td class="style25" colspan="2">
                    &nbsp;&nbsp;&nbsp;
                    <asp:RadioButtonList ID="LiveMoveOutReason" runat="server">
                        <asp:ListItem Value="1">ตาย</asp:ListItem>
                        <asp:ListItem Value="2">ย้าย</asp:ListItem>
                        <asp:ListItem Value="3">สาบสูญ</asp:ListItem>
                        <asp:ListItem Value="0">ไม่มี</asp:ListItem>
                    </asp:RadioButtonList>
                </td>
                <td class="style25">
                    &nbsp;</td>
                <td class="style25">
                    &nbsp;</td>
            </tr>
            <tr>
                <td class="style25">
                    &nbsp;</td>
                <td class="style25" colspan="2">
                    &nbsp;</td>
                <td class="style25">
                    &nbsp;</td>
                <td class="style25">
                    &nbsp;</td>
            </tr>
        </table>
        </asp:Panel>  

    </asp:Panel> 
    <asp:Panel ID="Panel4" runat="server" GroupingText="การศึกษาและการทำงาน" 
        Visible="False">
        ระดับการศึกษา<asp:RadioButtonList ID="EducationLevelRBL" runat="server">
        </asp:RadioButtonList>
        อาชีพ<br />
        <asp:RadioButtonList ID="OccupationRBL" runat="server">
        </asp:RadioButtonList>
        สถานที่ทำงาน<asp:TextBox ID="AddressOccupationTB" runat="server"></asp:TextBox>
        <br />
        <br />
        รายได้ต่อเดือน<asp:TextBox ID="IncomePerMonthTB" runat="server"></asp:TextBox>
        &nbsp;บาท<br />
        <br />
        รายได้จากที่อื่น<asp:TextBox ID="OtherIncomeTB" runat="server"></asp:TextBox>
        บาท<br />
        <br />
        ที่มาของรายได้<asp:TextBox ID="OtherIncomeFromTB" runat="server"></asp:TextBox>
        <br />
        <br />
        <br />
        <asp:Button ID="Button1" runat="server" onclick="Button1_Click" 
            style="text-align: center; margin-left: 5px" Text="บันทึก" />
    </asp:Panel>
    &nbsp;



    

              </ContentTemplate>
    </asp:UpdatePanel>
          
        
         
           
        
         
                </div>
            <br />    
            </div>



        <div id="sidebar">
		<ul>
			<li>
				<h2>Edit/Register</h2>
					<ul>
                          <li><a href="regl.aspx">ข้อมูลส่วนตัว</a></li>
                                     <li><a href="regfamily.aspx" class="current" >ข้อมูลครอบครัว</a></li>
                                         
                                             <li><a href="education.aspx" >ข้อมูลการศึกษา</a></li>
                                                 <li><a href="rightsinfo.aspx" >ข้อมูลสิทธิ</a></li>
                                                  <li><asp:Image ID="Image1" runat="server" Height="162px" Width="179px" /></li>
					</ul>
				</li>
			</ul>
        </div>


    </div>
</asp:Content>
